#coding:utf-8
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, Integer, String, TIMESTAMP
from sqlalchemy import Sequence
import json
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
Base = declarative_base()

class UserInfo(Base):

	__tablename__ = "user_info"
	
	id = Column(Integer, Sequence('user_id_seq'), primary_key=True)
	uname = Column(String)
	uphone = Column(String)
	upwd = Column(String)
	uimg = Column(String)
	uintroduction = Column(String)
	usex = Column(Integer)
	ubirthday = Column(TIMESTAMP)
	utype = Column(Integer)

	def __repr__(self):
		dic = { "uname":self.uname, "uimg":self.uimg, "uintroduction":self.uintroduction,"usex":self.usex,"ubirthday":self.ubirthday,"utype":self.utype}
		dic = str(dic)
		return json.dumps(dic)